package cn.rongdao.jrkabao.model.takephoto;

import com.mifengkong.frtools.http.request.HttpFunction;

import cn.rongdao.jrkabao.bean.information.IdCardInfoByYituDistinguishBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2018/5/3
 */

public class IdCardOCRModel extends BaseKaMaoModel {

    public static IdCardOCRModel getInstance() {
        return getPresent(IdCardOCRModel.class);
    }

    public void execute(String idPic, Observer<IdCardInfoByYituDistinguishBean> observer) {
        addParamStrings("id_pic",idPic);
        addParamStrings("ocr_mode","1");
        Observable<IdCardInfoByYituDistinguishBean> observable=mServletApi.ocrIdCard(mParams).map(new HttpFunction<IdCardInfoByYituDistinguishBean>());
        toSubscribe(observable,observer);
    }
}